﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Web;

namespace d1Common.WebController
{
    public class UserException : Exception
    {
        public UserException(string _reason, HttpStatusCode _statusCode)
            : base(_reason)
        {
            this.HttpStatusCode = _statusCode;
            this.Reason = _reason;
        }

        public UserException(string _reason)
            : base(_reason)
        {
            this.HttpStatusCode = HttpStatusCode.InternalServerError;
            this.Reason = _reason;
        }

        public HttpStatusCode HttpStatusCode
        {
            get;
            private set;
        }

        public string Reason
        {
            get;
            private set;
        }
    }
}